package com.dev.base.ability;

import com.dev.base.able.BaseModel;
import com.dev.base.bean.BaseBean;
import com.dev.base.expand.HosScheduler;
import com.dev.base.expand.TodoAny;
import dev.base.ResourceTable;
import ohos.aafwk.abilityjet.activedata.ActiveData;
import ohos.miscservices.timeutility.Time;

import java.util.ArrayList;
import java.util.List;


public class MainModel extends BaseModel {

public static final int[] image= {ResourceTable.Media_e1,ResourceTable.Media_e2,ResourceTable.Media_e3,ResourceTable.Media_e4,ResourceTable.Media_e5,ResourceTable.Media_e6,ResourceTable.Media_e7,ResourceTable.Media_e8,ResourceTable.Media_e9,ResourceTable.Media_e10};
    public void login(){
       todo(new TodoAny(1, HosScheduler.TYPE_SCHEDULER_IO, () -> {
           List<MainBean> mainBeanList=new ArrayList<>();
           BaseBean bean=new BaseBean();
           for(int a=0;a<10;a++){
               MainBean main=new MainBean();
               ActiveData<String> data=new ActiveData<>();
               data.setData("1");
               main.setButton1(data);
               mainBeanList.add(main);
           }
           Time.sleep(1000L);
           bean.setFlag(0);
           bean.setDataObject(mainBeanList);
           return bean;
       }));
   }


}
